import { Org } from "../Auth";

export type GetMeRsp = {
  realName: string;
  nickname: string;
  idCardNo: string;
  avatar: string;
  likes: number; //点赞总数(被点赞)
  follows: number;  //关注总数
  following: number; //粉丝总数 
  orgList: Org[];
  desc: string; // 个人简介
  sexual: number; // 性别
}

export type likesDataRsp={
  likes: number; //点赞总数(被点赞)
  follows: number;  //关注总数
  following: number; //粉丝总数 
}

export type GetAnchorDetailsRsp = {
  realName: string;  //主播姓名
  sexual: number; //性别
  avatar: string;  //头像
  desc: string; //个人描述
  orgName: string;  //所属机构名称
  orgId: string; //所属机构id
  orgLogo: string;  //机构logo
  likes: number; //点赞总数(被点赞)
  follows: number;  //关注总数
  following: number; //粉丝总数 
}

export type SubscriptionRsp = {
  planName: string; //套餐名称
  planCode: string;  //订阅代码
  roomRound: number; //剩余直播场次(付费单场)
  expires: number; //套餐过期时间
  options: OptionItem[]; //功能列表
  planMemo: string; // 套餐简介
}

export type OptionItem = {
  optionName: string; //功能名称
  optionValue: string; //功能值
  appRestrict: string[]; //功能限定
  sequence: number; //排序
  logo: string; //logo
  type: number; //类型
}

export type GetOrgDetailsRsp = {
  orgName: string;  //所属机构名称 
  desc: string; //机构描述
  orgLogo: string;  //机构logo 
  following: number; //粉丝总数 
  isFollowed:string; //是否关注了
}

//直播动态字段
export type LiveParams = {
  roomId: string;
  roomName: string;
  picUrl: string;
  startTime: string;
  endTime: string;
};

//关注主播直播动态字段
export type AnchorlatestRsp = {
  rooms: LiveParams[];
  status:string;
};

export type UnifiedOrderRsp = {
  appId: string; //小程序id
  nonceStr: string; //随机串
  package: string;  //统一下单接口返回的 prepay_id 参数值，提交格式如：prepay_id=***
  paySign: string; //支付签名
  signType?: 'MD5' | 'HMAC-SHA256'; //签名算法
  timeStamp: string;  //时间戳，秒
  mchOrderId:string; //订单id
}

// 套餐类型
export type Plans = { 
  planName: string;
  planCode:string;
  priceMonth: number;
  priceYear:number;
  priceRound: number;
  memo:string;
  type: number;
  plan_id: string;
  options: PlanOptions[];
}

// 套餐功能
export type PlanOptions = { 
  optionName: string;
  optionValue: string;
  optionMemo: string;
  logo: string;
  type:number;
  appRestrict:[];
  planOptionCount:number;
  planOptionMemo:string; 
}

// 订阅信息
export type subsMsg = {
  type: number; //套餐类型
  expires: number; //到期时间
  roomRound: number; //单场次数
  planName: string; //套餐名字
  planCode:string;
  planId: string; //套餐id
  priceMonth: BigInt; //套餐价格
  options: Options[];
}

// 套餐功能
export type Options = {
  optionName: string;
  optionValue: string; 
  optionCount:number;
  logo: string;
  type: number;
  appRestrict: []; 
}